<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>房联行增值服务部后台管理中心</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="stylesheet" href="./css/font.css">
		<link rel="stylesheet" href="./css/xadmin.css">
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="./js/xadmin.js"></script>
		<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
		<!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
	</head>
<body>
<div class="x-body">
	<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">装修公司管理</a>
        <a>
          <cite>新增装修公司</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon layui-icon-refresh-1" style="line-height:30px"></i>
      </a>
    </div>
	<div class="layui-tab">
		<ul class="layui-tab-title">
			<li class="layui-this">新增装修公司</li>
			<li>商家简介</li>
			<li>装修案例</li>
		</ul>
		<div class="layui-tab-content mt20">
			<!--新增装修公司开始-->
			<div class="layui-tab-item layui-show">
				<form class="layui-form">
					<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
					  	<legend>装修公司信息</legend>
					</fieldset>
					<div class="layui-row layui-col-space15">
					    <div class="layui-col-xs6">
					    	<div class="layui-form-item">
								<label for="desc" class="layui-form-label">公司名称：</label>
								<div class="layui-input-inline">
									<input type="text" id="title" name="title" required="" lay-verify="required" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
								<label for="desc" class="layui-form-label">公司logo：</label>
								<div class="layui-input-inline">
									<div class="layui-form-item">
									<img class="layui-upload-img" id="logo_show" width="190" src="images/banner.png">
									<p id="demoText"></p>
							    </div>
								<button type="button" class="layui-btn" id="logo" style="width:190px;"><i class="layui-icon"></i>上传图片</button>
								</div>
							</div>
							<div class="layui-form-item">
								<label for="desc" class="layui-form-label">联系电话：</label>
								<div class="layui-input-inline">
									<input type="text" id="tel" name="tel" required="" lay-verify="required" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
								<label for="desc" class="layui-form-label">是否认证：</label>
								<div class="layui-input-inline">
									<input type="text" id="isauthen" name="isauthen" required="" lay-verify="required" autocomplete="off" class="layui-input w100" value="否">
								</div>
							</div>
							
							<div class="layui-form-item">
						        <label class="layui-form-label">公司地址：</label>
						        <div class="layui-input-inline" style="width:60px;">
						        	<input type="text" name="price_min" placeholder="" autocomplete="off" class="layui-input">
						        </div>
						        <div class="layui-form-mid">省</div>
						        <div class="layui-input-inline" style="width: 60px;">
						        	<input type="text" name="price_max" placeholder="" autocomplete="off" class="layui-input">
						        </div>
						        <div class="layui-form-mid">市</div>
						        <div class="layui-input-inline" style="width: 60px;">
						        	<input type="text" name="price_max" placeholder="" autocomplete="off" class="layui-input">
						        </div>
						        <div class="layui-form-mid">区</div>
						          <div class="layui-input-inline">
						    	
						        <input type="text" name="address-detail" placeholder="详细地址" autocomplete="off" class="layui-input w240">
						    </div>
						    </div>
						  
					    </div>
					    <div class="layui-col-xs6">
					    	<div class="layui-form-item">
								<label for="desc" class="layui-form-label">口碑值：</label>
								<div class="layui-input-inline">
									<input type="text" id="koubei" name="koubei" required="" lay-verify="required" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
						        <label class="layui-form-label">接单范围：</label>
						        <div class="layui-input-inline" style="width:60px;">
						        	<input type="text" name="price_min" placeholder="￥" autocomplete="off" class="layui-input">
						        </div>
						        <div class="layui-form-mid">-</div>
						        <div class="layui-input-inline" style="width: 60px;">
						        	<input type="text" name="price_max" placeholder="￥" autocomplete="off" class="layui-input">
						        </div>
						    </div>
						    <div class="layui-form-item">
				    			<label class="layui-form-label">建筑类型：</label>
								<div class="layui-input-inline" style="width: 100px;">
									<select name="type">
							        <option value="">全部</option>
							        <option value="公寓" selected="">公寓</option>
							        <option value="复式">复式</option>
							        <option value="别墅">别墅</option>
							        <option value="工装">工装</option>
							    </select>
								</div>
				    		</div>
				    		<div class="layui-form-item">
				    			<label class="layui-form-label">接单类型：</label>
								<div class="layui-input-inline" style="width: 100px;">
									<select name="order_type">
								        <option value="">全部</option>
								        <option value="基装" selected="">基装</option>   
								        <option value="整装">整装</option>
							    	</select>
								</div>
				    		</div>
				    		<div class="layui-form-item">
								<label for="desc" class="layui-form-label">推荐标签：</label>
								<div class="layui-input-inline">
									<input type="text" id="label" name="label" required="" lay-verify="required" autocomplete="off" class="layui-input">
								</div>
							</div>
					    	
					    </div>
					</div>
					<div class="layui-form-item" style="margin: 40px auto 40px auto; text-align: center;">
						
						<button class="layui-btn p40" lay-filter="add" lay-submit="" id="addfrom">保存</button>
						<button type="reset" class="layui-btn p40 layui-btn-primary">重置</button>
					</div>				
				</form>				
			</div>
			<!--公司简介-->
			<div class="layui-tab-item">
				<form class="layui-form">
				<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
				  	<legend>公司介绍</legend>
				</fieldset>   
				<div style="padding: 20px; background-color: #F2F2F2;">
				  <div class="layui-row layui-col-space15">
				    <div class="layui-col-md12">
				      <div class="layui-card">
				        <div class="layui-card-header font18">公司简介</div>
				        <div class="layui-card-body">
				          <textarea placeholder="请输入公司介绍" lay-verify="about" name="about" class="layui-textarea" style="height: 120px;"></textarea>
				        </div>
				      </div>
				    </div>
				    <div class="layui-col-md4">
				      <div class="layui-card">
				        <div class="layui-card-header font16">公司规模</div>
				        <div class="layui-card-body">
				         	<textarea placeholder="信息" lay-verify="about" name="about" class="layui-textarea"></textarea>
				        </div>
				      </div>
				    </div>
				    <div class="layui-col-md4">
				      <div class="layui-card">
				        <div class="layui-card-header font16">装后服务</div>
				        <div class="layui-card-body">
				         	<textarea placeholder="信息" lay-verify="about" name="about" class="layui-textarea"></textarea>
				        </div>
				      </div>
				    </div>
				    <div class="layui-col-md4">
				      <div class="layui-card">
				        <div class="layui-card-header font16">特色服务</div>
				        <div class="layui-card-body">
				         	<textarea placeholder="信息" lay-verify="about" name="about" class="layui-textarea"></textarea>
				        </div>
				      </div>
				    </div>
				  </div>
				</div>
				
				<div class="layui-row">
				    <div class="layui-col-xs6">
				        <div class="grid-demo grid-demo-bg1">
				      		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
							   <legend>工商注册信息</legend>
							</fieldset>   
							<div style="padding: 20px; background-color: #F2F2F2; margin-right: 10px;">
							    <div class="layui-row layui-col-space15">
							        <div class="layui-col-md12">
							            <div class="layui-form-item">
											<label for="desc" class="layui-form-label">广告标题：</label>
											<div class="layui-input-inline">
												<input type="text" id="title" name="title" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="layui-form-item">
											<label for="desc" class="layui-form-label">公司类型：</label>
											<div class="layui-input-inline">
												<input type="text" id="ctype" name="ctype" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="layui-form-item">
											<label for="desc" class="layui-form-label">注册地址：</label>
											<div class="layui-input-inline">
												<input type="text" id="address" name="address" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="layui-form-item">
											<label for="desc" class="layui-form-label">注册资金：</label>
											<div class="layui-input-inline">
												<input type="text" id="funds" name="funds" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="layui-form-item">
											<label for="desc" class="layui-form-label">营业期限：</label>
											<div class="layui-input-inline">
												<input type="text" id="deadline" name="deadline" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="layui-form-item">
											<label for="desc" class="layui-form-label">成交日期：</label>
											<div class="layui-input-inline">
												<input type="text" id="clinch_date" name="clinch_date" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="layui-form-item">
											<label for="desc" class="layui-form-label">登记机关：</label>
											<div class="layui-input-inline">
												<input type="text" id="check_office" name="check_office" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="layui-form-item">
											<label for="desc" class="layui-form-label">经营范围：</label>
											<div class="layui-input-inline">
												<input type="text" id="Business_area" name="Business_area" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="layui-form-item">
											<label for="desc" class="layui-form-label">年间时间：</label>
											<div class="layui-input-inline">
												<input type="text" id="desc" name="desc" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="layui-form-item">
											<label for="desc" class="layui-form-label">注册号：</label>
											<div class="layui-input-inline">
												<input type="text" id="desc" name="desc" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
										<div class="layui-form-item">
											<label for="desc" class="layui-form-label">法定代表：</label>
											<div class="layui-input-inline">
												<input type="text" id="desc" name="desc" required="" lay-verify="required" autocomplete="off" class="layui-input">
											</div>
										</div>
							    	</div>
								    
							    </div>
							</div> 
				        </div>
				    </div>
				    <div class="layui-col-xs6">
				        <div class="grid-demo grid-demo-bg1">
				      		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
							   <legend>企业证书</legend>
							</fieldset>   
							<div style="padding: 20px; background-color: #F2F2F2;">
							    <div class="layui-row layui-col-space15">
							        <div class="layui-col-md12">
							            
								        	<div class="layui-form-item">
												<div class="layui-input-inline">
													<div class="layui-form-item">
													<label class="layui-form-label"></label>
													<img class="layui-upload-img" id="banner_show" width="190" src="images/banner.png">
													<p id="demoText"></p>
											    </div>
												<button type="button" class="layui-btn" id="banner" style="width: 190px;"><i class="layui-icon"></i>上传图片</button>
												</div>
											</div>
							      		
							    	</div>
							    </div>
							</div> 
				        </div>
				    </div>
				</div>
				
				<div class="layui-form-item" style="margin: 40px auto 40px auto; text-align: center;">
					
					<button class="layui-btn p40" lay-filter="add" lay-submit="" id="addfrom">提交</button>
					<button type="reset" class="layui-btn p40 layui-btn-primary">重置</button>
				</div>
			</form>
				
				
			</div>
			<div class="layui-tab-item">
				<xblock>
					<button class="layui-btn layui-btn-sm layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>
					<button class="layui-btn layui-btn-sm" onclick="x_admin_show('新增案例','./case-add.html')"><i class="layui-icon"></i>新增</button>
					<span class="x-right" style="line-height:40px">共有数据：88 条</span>
			    </xblock>
				<table class="layui-table">
				<thead>
					<tr>
						<th>
							<div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
						</th>
						<th>ID</th>
						<th>姓名</th>
						<th>区域</th>
						<th>年限</th>
						<th>擅长风格</th>
						<th>收费标准</th>
						<th>职务</th>
						<th>毕业院校</th>
						<th>创建时间</th>
						<th>设计理念</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>
						</td>
						<td>101</td>
						<td>吕子祁</td>
						<td>洛阳市洛龙区</td>
						<td>10年</td>
						<td>中式,美式,现代/简约</td>
						<td></td>
						<td>首席设计师</td>
						<td>中原工学院</td>
						<td>2018-05-17</td>
						<td>形式追随功能，让每一处都能成为景观。</td>
					  	<td class="td-editor">
							<a title="详情" onclick="x_admin_show('详情','company-editor.html')" href="javascript:;">详情</a>
							<a title="编辑" onclick="x_admin_show('编辑','company-editor.html')" href="javascript:;">编辑</a>
							<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">删除</a>
						</td>
					</tr>
					<tr>
						<td>
							<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>
						</td>
						<td>101</td>
						<td>吕子祁</td>
						<td>洛阳市洛龙区</td>
						<td>10年</td>
						<td>中式,美式,现代/简约</td>
						<td></td>
						<td>首席设计师</td>
						<td>中原工学院</td>
						<td>2018-05-17</td>
						<td>形式追随功能，让每一处都能成为景观。</td>
					  	<td class="td-editor">
							<a title="详情" onclick="x_admin_show('详情','company-editor.html')" href="javascript:;">详情</a>
							<a title="编辑" onclick="x_admin_show('编辑','company-editor.html')" href="javascript:;">编辑</a>
							<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">删除</a>
						</td>
					</tr>
					<tr>
						<td>
							<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>
						</td>
						<td>101</td>
						<td>吕子祁</td>
						<td>洛阳市洛龙区</td>
						<td>10年</td>
						<td>中式,美式,现代/简约</td>
						<td></td>
						<td>首席设计师</td>
						<td>中原工学院</td>
						<td>2018-05-17</td>
						<td>形式追随功能，让每一处都能成为景观。</td>
					  	<td class="td-editor">
							<a title="详情" onclick="x_admin_show('详情','company-editor.html')" href="javascript:;">详情</a>
							<a title="编辑" onclick="x_admin_show('编辑','company-editor.html')" href="javascript:;">编辑</a>
							<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">删除</a>
						</td>
					</tr>
					<tr>
						<td>
							<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>
						</td>
						<td>101</td>
						<td>吕子祁</td>
						<td>洛阳市洛龙区</td>
						<td>10年</td>
						<td>中式,美式,现代/简约</td>
						<td></td>
						<td>首席设计师</td>
						<td>中原工学院</td>
						<td>2018-05-17</td>
						<td>形式追随功能，让每一处都能成为景观。</td>
					  	<td class="td-editor">
							<a title="详情" onclick="x_admin_show('详情','company-editor.html')" href="javascript:;">详情</a>
							<a title="编辑" onclick="x_admin_show('编辑','company-editor.html')" href="javascript:;">编辑</a>
							<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">删除</a>
						</td>
					</tr>
				</tbody>
			</table>
			<div id="page"></div>
			</div>
						
		</div>
		<!--新增装修公司结束-->
	</div>
</div>
		<script>
			layui.use(['form', 'layer', 'element', 'upload','laypage', 'laydate'], function() {
				var $ = layui.jquery
				var form = layui.form,
				layer = layui.layer,
				upload = layui.upload;	
				var laydate = layui.laydate;
				var laypage = layui.laydate;
				//调用时间
				laydate.render({
					elem: '#datetime'
				});
				laydate.render({
					elem: '#clinch_date'
				});
				
				 //分页
			    laypage.render({
					elem: 'page'
			        ,count: 100
			        ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
			        ,jump: function(obj){
			          console.log(obj)
			        }
			    });

				//普通图片上传
				var uploadInst = upload.render({
					elem: '#logo',
					url: '/upload/'
					,before: function(obj) {
						//预读本地文件示例，不支持ie8
						obj.preview(function(index, file, result) {
							$('#logo_show').attr('src', result); //图片链接（base64）
						});
					},
					done: function(res) {
						//如果上传失败
						if(res.code > 0) {
							return layer.msg('上传失败');
						}
						//上传成功
					},
					error: function() {
						//演示失败状态，并实现重传
					
					}
				});
			  //监听指定开关
			  form.on('switch(switchTest)', function(data){
			    /*layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
			      offset: '6px';
			    });*/
			   
			  });
				//监听提交
				form.on('submit(add)', function(data) {
					console.log(data);
					//发异步，把数据提交给php
					layer.alert("添加成功", {
						icon: 6
					}, function() {
						// 获得frame索引
						var index = parent.layer.getFrameIndex(window.name);
						//关闭当前frame
						parent.layer.close(index);
					});
					return false;
				});
			});
		</script>
	</body>
</html>